def get_cctx_xulie_event_eth_bsc_source(data_dict):
    # 事件字典数据
    Lock_event = {}
    Deposit_event = {}

    # 获取Lock_event数据
    Lock_event["tx_s"] = data_dict["source_chain_data"]["hash"]
    Lock_event["sc_s"] = data_dict["source_chain_data"]["to_address"]
    Lock_event["asset_s"] = data_dict["cross_chain_data"]["input"]["asset"]
    Lock_event["amount_s"] = data_dict["cross_chain_data"]["input"]["amount"]
    Lock_event["to_s"] = data_dict["source_chain_data"]["to_address"]


    Deposit_event["tx_s"] = data_dict["source_chain_data"]["hash"]
    Deposit_event["sc_s"] = data_dict["source_chain_data"]["to_address"]
    Deposit_event["asset_s"] = data_dict["cross_chain_data"]["input"]["asset"]
    Deposit_event["amount_s"] = data_dict["cross_chain_data"]["input"]["amount"]
    Deposit_event["ID_d"] = data_dict["cross_chain_data"]["output"]["chain"]
    Deposit_event["asset_d"] = data_dict["cross_chain_data"]["output"]["asset"]
    Deposit_event["to_d"] = data_dict["cross_chain_data"]["outbounds"][1]["to"]

    return Lock_event,Deposit_event


def get_cctx_xulie_event_eth_bsc_target(data_dict):
    # 事件字典数据
    Unlock_event = {}

    Unlock_event["tx_d"] = data_dict["target_chain_data"]["hash"]
    Unlock_event["sc_d"] = data_dict["target_chain_data"]["to_address"]
    Unlock_event["asset_d"] = data_dict["cross_chain_data"]["output"]["asset"]
    Unlock_event["amount_d"] = data_dict["cross_chain_data"]["outbounds"][1]["amount"]
    Unlock_event["to_d"] = data_dict["cross_chain_data"]["outbounds"][1]["to"]

    return Unlock_event


def get_cctx_xulie_event_multichain_source(data_dict):
    # 事件字典数据
    Lock_event = {}
    Deposit_event = {}

    # 获取Lock_event数据
    Lock_event["tx_s"] = data_dict["source_chain_data"]["hash"]
    Lock_event["sc_s"] = data_dict["source_chain_data"]["to_address"]
    if("srcTokenName" in data_dict):
        Lock_event["asset_s"] = data_dict["cross_chain_data"]["srcTokenName"]
    else:Lock_event["asset_s"] = ""
    if("srcAmount" in data_dict):
        Lock_event["amount_s"] = data_dict["cross_chain_data"]["srcAmount"]
    else:Lock_event["amount_s"] =""
    Lock_event["to_s"] = data_dict["source_chain_data"]["to_address"]


    Deposit_event["tx_s"] = data_dict["source_chain_data"]["hash"]
    Deposit_event["sc_s"] = data_dict["source_chain_data"]["to_address"]
    if ("srcTokenName" in data_dict):
        Deposit_event["asset_s"] = data_dict["cross_chain_data"]["srcTokenName"]
    else:
        Deposit_event["asset_s"] = ""
    if ("srcAmount" in data_dict):
        Deposit_event["amount_s"] = data_dict["cross_chain_data"]["srcAmount"]
    else:
        Deposit_event["amount_s"] = ""
    Deposit_event["ID_d"] = data_dict["cross_chain_data"]["tochainName"]

    if ("destTokenName" in data_dict):
        Deposit_event["asset_d"] = data_dict["cross_chain_data"]["destTokenName"]
    else:
        Deposit_event["asset_d"] = ""
    if ("srcAmount" in data_dict):
        Deposit_event["amount_s"] = data_dict["cross_chain_data"]["srcAmount"]
    else:
        Deposit_event["amount_s"] = ""

    if("destTokenAddress" in data_dict):
        Deposit_event["to_d"] = data_dict["cross_chain_data"]["destTokenAddress"]
    else:Deposit_event["to_d"]=""

    return Lock_event,Deposit_event


def get_cctx_xulie_event_multichain_target(data_dict):
    # 事件字典数据
    Unlock_event = {}

    Unlock_event["tx_d"] = data_dict["target_chain_data"]["hash"]
    Unlock_event["sc_d"] = data_dict["target_chain_data"]["to_address"]

    if("destTokenName" in data_dict):
        Unlock_event["asset_d"] = data_dict["cross_chain_data"]["destTokenName"]
    else:Unlock_event["asset_d"]=""

    if ("destAmount" in data_dict):
        Unlock_event["amount_d"] = data_dict["cross_chain_data"]["destAmount"]
    else:
        Unlock_event["amount_d"] = ""

    if ("destTokenAddress" in data_dict):
        Unlock_event["to_d"] = data_dict["cross_chain_data"]["destTokenAddress"]
    else:
        Unlock_event["to_d"] = ""


    return Unlock_event